﻿/// <reference path="../../Scripts/jquery-vsdoc.js" />
var Login = {
    Login: function (options, callback) {
        var params = {
            action: "checklogin",
            uid: "",
            pwd: "",
            code: ""
        };
        params = $.extend(params, options);
        var data = $.param(params);
        jQuery.ajax({
            type: "POST",
            url: "/API/Login/Login.ashx",
            data: data,
            cache: false,
            success: function (a) {
                callback(a);
            },
            error: function (a) {
                callback("error");
            }
        });
    },
    LogOut: function (callback) {
        jQuery.ajax({
            type: "POST",
            url: "/API/Login/Login.ashx",
            data: "Action=loginout",
            cache: false,
            success: function (a) {
                callback(a);
            },
            error: function (a) {
                callback("error");
            }
        });
    },
    InitLogin: function (callback) {

    }
};